package model.compare;

import java.util.Comparator;

import model.SparePart;

/**
 * Compare by Name: if the result is positive than the o1 is the bigger. If the
 * result is negative the o2 is the bigger. if the result is zero that means the
 * two Objects are equals.
 * 
 * @author Csaba Tarkanyi
 */
public class CompareByName implements Comparator<SparePart> {
	@Override
	public int compare(SparePart o1, SparePart o2) {
		return o1.getName().compareTo(o2.getName());
	}
}